package com.msb.mall.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.msb.mall.common.valid.ValidListValue;
import com.msb.mall.common.valid.groups.AddGroupsInterface;
import com.msb.mall.common.valid.groups.UpdateGroupsInterface;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * Ʒ?
 * 
 * @author mf
 * @email 871672293@qq.com
 * @date 2025-02-09 16:37:24
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * Ʒ??id
	 */
	@TableId
	@NotNull(message = "品牌id不能为空",groups = {UpdateGroupsInterface.class})
	@Null(message = "品牌id必须为空",groups = {AddGroupsInterface.class})
	private Long brandId;
	/**
	 * Ʒ???
	 */
	@NotBlank(message = "品牌名不能为空",groups = {AddGroupsInterface.class, UpdateGroupsInterface.class})
	private String name;
	/**
	 * Ʒ??logo??ַ
	 */
	@NotBlank(message = "品牌logo地址不能为空")
	private String logo;
	/**
	 * ???
	 */
	@NotBlank(message = "介绍不能为空",groups = {AddGroupsInterface.class, UpdateGroupsInterface.class})
	private String descript;
	/**
	 * ??ʾ״̬[0-????ʾ??1-??ʾ]
	 */
	@NotNull(message = "显示状态不能为空",groups = {AddGroupsInterface.class})
	@ValidListValue(val = {0,1})
	private Integer showStatus;
	/**
	 * ????????ĸ
	 */
	@NotBlank(message = "检索首字母不能为空",groups = AddGroupsInterface.class)
	@Pattern(regexp = "^[a-zA-Z]$",message = "检索首字母必须是单个的字母",groups = {UpdateGroupsInterface.class,AddGroupsInterface.class})
	private String firstLetter;
	/**
	 * ???
	 */
	@NotNull(message = "排序不能为null",groups = AddGroupsInterface.class)
	@Min(value = 0,message = "排序不能小于0",groups = {UpdateGroupsInterface.class,AddGroupsInterface.class})
	private Integer sort;

}
